package com.bwie.controller;

import com.bwie.pojo.Gym;
import com.bwie.service.GymService;
import com.bwie.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author lenovo
 */
@RestController
@RequestMapping("/gym")
public class GymController {

    @Autowired
    private GymService gymService;

    @PostMapping("/list")
    public R list(){
        List<Gym> list = gymService.list();
        return R.OK(list);
    }
}
